package com.classtest.DemoExpend.service.Impl;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.classtest.DemoExpend.bean.DbRelation;
import com.classtest.DemoExpend.dao.DbRelationDao;
import com.classtest.DemoExpend.service.DbRelationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class DbRelationServiceImpl extends ServiceImpl<DbRelationDao, DbRelation> implements DbRelationService {

    @Resource
    DbRelationDao dbRelationDao;

    @Override
    public List<DbRelation> getRelationCount(String json){
        return dbRelationDao.getRelationCount(JSONObject.parseObject(json,DbRelation.class));
    }
}
